package main

import (
	"fmt"
	"os"
	"pkgm/cmd"
	"pkgm/config"
)

func main() {

	if len(os.Args) < 2 {
		cmd.PrintHelp()
		return
	}

	config.InitConfig()
	dir, err := os.Getwd()
	if err != nil {
		fmt.Println("获取当前工作目录失败:", err)
		return
	}
	fmt.Println("当前工作目录:", dir)

	cmd.RunCommand(os.Args[1], os.Args[2:])
}
